package au.com.handsunited.dao;

import java.util.List;

import au.com.handsunited.model.BaseEntity;
import au.com.handsunited.model.Group;
import au.com.handsunited.model.Organisation;
import au.com.handsunited.model.Project;
import au.com.handsunited.model.User;
import au.com.handsunited.model.relationship.Relationship;

/**
 *
 * @author arunda
 */
public interface EntityDAO {

	/**
	 *
	 * @param entity
	 * @return TODO
	 */
	BaseEntity createEntity(BaseEntity entity);

	/**
	 *
	 * @param id
	 * @return
	 */
	BaseEntity getEntity(Long id);

	/**
	 *
	 * @param id
	 * @param clazz
	 * @return
	 */
	BaseEntity getEntity(Long id, Class clazz);

	/**
	 *
	 * @param entity
	 * @return
	 */
	BaseEntity updateEntity(BaseEntity entity);

	/**
	 *
	 * @param entity
	 * @param firstResult
	 * @param maxResults
	 * @return
	 */
	List<Group> getGroupsInNetworkFor(BaseEntity entity, int firstResult, int maxResults);

	/**
	 *
	 * @param entity
	 * @param firstResult
	 * @param maxResults
	 * @return
	 */
	List<Relationship> getGroupRelationshipsFor(BaseEntity entity, int firstResult, int maxResults);

	/**
	 *
	 * @param entity
	 * @param firstResult
	 * @param maxResults
	 * @return
	 */
	List<Organisation> getOrganisationsInNetworkFor(BaseEntity entity, int firstResult, int maxResults);

	/**
	 *
	 * @param entity
	 * @param firstResult
	 * @param maxResults
	 * @return
	 */
	List<Relationship> getOrganisationRelationshipsFor(BaseEntity entity, int firstResult, int maxResults);

	/**
	 *
	 * @param entity
	 * @param firstResult
	 * @param maxResults
	 * @return
	 */
	List<Project> getProjectsInNetworkFor(BaseEntity entity, int firstResult, int maxResults);

	/**
	 *
	 * @param entity
	 * @param firstResult
	 * @param maxResults
	 * @return
	 */
	List<Relationship> getProjectRelationshipsFor(BaseEntity entity, int firstResult, int maxResults);

	/**
	 *
	 * @param entity
	 * @param firstResult
	 * @param maxResults
	 * @return
	 */
	List<User> getUsersInNetworkFor(BaseEntity entity, int firstResult, int maxResults);

	/**
	 *
	 * @param entity
	 * @param firstResult
	 * @param maxResults
	 * @return
	 */
	List<Relationship> getUserRelationshipsFor(BaseEntity entity, int firstResult, int maxResults);

}
